/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package noyau;

/**
 *
 * @author Hoang
 */
public class Capteur {
    
    public enum TYPE {
        CAP_LUMIERE_EN, CAP_TEMP_EN, CAP_PRESENT_EN, ACT_INT_EN, CAP_LUM_PRE_EN, 
        CAP_CONTACT_EN,
        CAP_LUMIERE_SUN, CAP_TEMP_SUN, CAP_PRESENT_SUN, CAP_BOUTON_EN
    }
    
    private double temperature = 0;    //Temperature mesuree par la capteur
    private Boolean presence = false;     //Presence detectee par le capteur
    private float luminosite = 0;     //Luminosite mesuree par le capteur
    private Boolean contactOuvert = false; //Etat du capteur de contact
    private TYPE type;
    private String id;
    private int boutonAppuye = 0;
    private int etatBouton = 0;

    public Capteur(TYPE type, String id) {
        this.type = type;
        this.id = id;
    }

    public Capteur(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public int getBoutonAppuye() {
        return boutonAppuye;
    }

    public void setBoutonAppuye(int boutonAppuye) {
        this.boutonAppuye = boutonAppuye;
    }

    public Boolean getContactOuvert() {
        return contactOuvert;
    }

    public void setContactOuvert(Boolean contactOuvert) {
        this.contactOuvert = contactOuvert;
    }

    public int getEtatBouton() {
        return etatBouton;
    }

    public void setEtatBouton(int etatBouton) {
        this.etatBouton = etatBouton;
    }

    public float getLuminosite() {
        return luminosite;
    }

    public void setLuminosite(float luminosite) {
        this.luminosite = luminosite;
    }

    public Boolean getPresence() {
        return presence;
    }

    public void setPresence(Boolean presence) {
        this.presence = presence;
    }

    public double getTemperature() {
        return temperature;
    }

    public void setTemperature(double temperature) {
        this.temperature = temperature;
    }

    public TYPE getType() {
        return type;
    }

    public void setType(TYPE type) {
        this.type = type;
    }
    
}
